// Agent producer_Alison in project swatJacamo

/* Initial beliefs and rules */

item_to_produce(0).

/* Initial goals */

!produce.

/* Plans */

+!produce: true 
	<-	!setupTools(Buffer);
		!produceItems.

+!produceItems : true 
	<-	?nextItemToProduce(Item);
		put(Item);
		!!produceItems.

+?nextItemToProduce(N) : true
	<- 	-item_to_produce(N);
		+item_to_produce(N+1).
		
+!setupTools(Buffer) : true 
	<-	makeArtifact("myBuffer","artifact.BufferAlison",[10],Buffer).
	
-!setupTools(Buffer) : true 
	<-	lookupArtifact("myBuffer",Buffer).
